python assign a function to variable